package com.shse;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAop {

	public static void main(String[] args){
		ApplicationContext context = new ClassPathXmlApplicationContext("111.xml");
		
		BusinessService businessService = context.getBean("businessService", BusinessService.class);
		
		businessService.insert(1, "ddd");
		businessService.update();		
		
		PeopleService peopleService = context.getBean("peopleService", PeopleService.class);
		
		peopleService.insert(2, "aaa");
		peopleService.update();
		peopleService.delete();
		
		((ConfigurableApplicationContext)context).close();
		
	}

}
